| [ Return to Bugs & Features | Roadmap 2.0 | Post Text | Post File | SVN ⇄ GIT ]
STR #2126
Application: | FLTK Library |
Status: | 5 - New |
Priority: | 4 - High, e.g. key functionality not working |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | Unassigned |
Summary: | Cairo: fltk::cr not affected by translation matrix |
Version: | 2.0-current |
Created By: | Jasu_M |
Assigned To: | Unassigned |
Fix Version: | Unassigned |
Update Notification: | |
Trouble Report Files:
[ Post File ]No files
Trouble Report Comments:
[ Post Text ]
|
#1 | Jasu_M 17:11 Jan 17, 2009 |
| In SVN, when drawing to fltk::cr in Widget::draw(), it draws to the upper-left corner of the window.
Hacks like this are currently required to fix this behaviour: void blah::draw() { ... Rectangle abs, wnd; get_absolute_rect(&abs); window()->get_absolute_rect(&wnd);
//Reset the global matrix, in case other draw() methods have altered it cairo_matrix_t matrix; cairo_matrix_init_identity(&matrix); cairo_set_matrix(cr, &matrix);
//Translate to upper-left corner of widget from that of window cairo_translate(cr, abs.x() - wnd.x(), abs.y() - wnd.y()); ...
It would be great if FLTK:s transformation matrix would be shared with Cairo, so it would behave logically. | |
[ Return to Bugs & Features | Post Text | Post File ]
|
| |